<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
	<script type="text/javascript" src="../../../js/boot.js"></script>
	<title>空页面</title>
</head>

<style>
	._selected {
		background-color: rgb(228, 206, 219);
	}
</style>

<body id="111">
	<h1 id="222">ddddddddddddddddddd</h1>
	<div id="ddd">
		<legend><span id="ddd">查询条件</span></legend>
	</div>
</body>

<script type="text/javascript">
	miniInit();

	// 鼠标点击事件
	document.onclick = function mouseClick(evt) {
		// debugger
		var target;
		if (evt) {//不是ie
			target = evt.target;
		} else if (window.event) {//ie
			target = window.event.srcElement;
		}
		// 如果控件定义的id
		if (target.id) {
			// 找到鼠标点击到的html组件
			target = $("#" + target.id);
			// 如果当前选中了页面控件
			var widget = parent.widgetTree.getSelectedNode();
			if (widget) {
				// 在html组件中添加页面控件
				// TODO
				// target.append('<span>查询条件</span>');
				target.append(widget.text);
			} else {
				// 对控件选择和反选
				if (target.hasClass("_selected")) {
					target.removeClass('_selected');
				} else {
					target.addClass('_selected');
				}
			}
		}
	}

	// 屏蔽右键快捷菜单
	document.oncontextmenu = function stop() {
		return false;
	}

	document.onmousedown = function click() {
		if (event.button == 2) {
			// alert("ok");
			var test = document.getElementsByTagName('html')[0].innerHTML;
		}
	}

	

</script>

</html>